<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .green{color: green}
        .red{color: red}
        .ft30{font-size: 30px;}
    </style>
</head>

<body>
    <div id="app"></div>

    <script src="../node_modules/vue/dist/vue.js"></script>
    <script>
        new Vue({
            el: '#app',
            template: `
                    <div class="box">
                        <p class="green" v-bind:class="classObject">我是文本</p> 
                        
                    </div>
                    `,
            data(){
                 return {
                    classObject:{
                        red:true,
                        ft30:true
                    }
                }
             }
        })
    </script>
</body>

</html>